package aishua.com.mytestapplist.hencoder;

import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;

import com.viewpagerindicator.IconPagerAdapter;

import java.util.List;


/**
 * Created by aishua on 2017/12/14.
 */

public class HencoderAdapter extends FragmentPagerAdapter {

    private List<Fragment> mViewList;
    private String[] mTablename = {"DrawColor()","DrawCircle()","DrawRect()","DrawArc()","直方图","饼图"};

    public HencoderAdapter(FragmentManager fm,List<Fragment> mViewList) {
        super(fm);
        this.mViewList  = mViewList;
    }


    @Override
    public Fragment getItem(int position) {

        return mViewList.get(position);
    }

    @Override
    public int getCount() {

        return mTablename.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {

        return mTablename[position];
    }

}
